using ASP;
using HoWave.Web;
using HoWave.Web.Shop;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class _ShopClass : Shop, IRequiresSessionState
{
	protected Literal ShopClassList;
	protected HtmlForm form_1;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_PreInit(object sender, EventArgs e)
	{
		try
		{
			Template.BindTemplateToPage(this.Page, "ShopIndex");
		}
		catch (Exception ex)
		{
			base.WriteTemErrMsg(ex.Message.ToString());
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		base.ShowCityArea();
		this.ShopClassList.Text = this.bandshopclass();
	}
	public string bandshopclass()
	{
		Shop_Class shop_Class = new Shop_Class(this.conn);
		DataTable rootClass = shop_Class.GetRootClass();
		string text = "";
		int num = 0;
		for (int i = 0; i < rootClass.Rows.Count; i++)
		{
			num++;
			text = text + "<div class=\"ShopCateL1\">" + Environment.NewLine;
			string text2 = text;
			text = string.Concat(new string[]
			{
				text2,
				"   <div class=\"hp\">",
				rootClass.Rows[i]["ClassName"].ToString(),
				"</div>",
				Environment.NewLine
			});
			text = text + "         <ul class= \"CategoryListNormalLevel1\" >" + Environment.NewLine;
			object obj = text;
			text = string.Concat(new object[]
			{
				obj,
				"            <li><a href='Search_Shop.aspx?classID=",
				rootClass.Rows[i]["Classid"],
				"' target='_blank'>",
				rootClass.Rows[i]["ClassName"].ToString(),
				"/</a></li>",
				Environment.NewLine
			});
			text = text + "         </ul>" + Environment.NewLine;
			text = text + "</div>" + Environment.NewLine;
			if ((num + 4) % 3 != 0)
			{
				text += "<div class=\"ShopCateL2\"></div>";
			}
		}
		return text;
	}
}
